﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="PlayQuizQuestions.aspx.vb" Inherits="Assignment4.PlayQuizQuestions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 173px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2>Quiz</h2>
    <asp:Panel ID="pnlQuestions" runat="server">
   
    <p>
        <asp:Label ID="lblQuestionNumber" runat="server"></asp:Label>
    </p>
    <table class="style1">
        <tr>
            <td class="style2" rowspan="5">
                <asp:Image ID="imgQuestion" CssClass="picturequiz" runat="server" />
            </td>
            <td>
                &nbsp;</td>
            <td>
                <asp:Label ID="lblQuestion" runat="server" Text="Label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:RadioButtonList ID="rblAnswer" runat="server">
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="btnAnswer" runat="server" Text="Answer" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Label ID="lblMessage" runat="server"></asp:Label>
            </td>
        </tr>
    </table>
    </asp:Panel>
    </br>

    <asp:Panel ID="pnlAnswers" Visible="false" runat="server">
    
    <table class="style1">
        <tr>
            <td>
                <b>Picture</b></td>
            <td>
                <b>Question</b></td>
            <td>
                <b>Answer</b></td>
            <td>
                <b></b></td>
            <td>
             
                <b>Correct Answer</b></td>
            <td>
                <b>Description</b></td>
        </tr>

        <asp:Repeater ID="rptResults" runat="server">
       <ItemTemplate>
        <tr>
            <td>
                <asp:Image ID="imgPicture" ImageUrl=<%# Eval("Quiz_QuestionPictureUrl")%> CssClass="gamepicture" runat="server" />
            </td>
             <td>
                <asp:Label ID="lblQuestion" runat="server" Text=<%# Eval("Quiz_QuestionContent")%>></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblAnswer" runat="server" Text=<%# getAnswer(Eval("Quiz_QuestionId"))%>></asp:Label>
            </td>
            <td>
                <asp:Image ID="imgCorrect" CssClass="correctpicture" ImageUrl=<%# checkAnswer(Eval("Quiz_QuestionId"))%> runat="server" />
            </td>
            <td>
                <asp:Label ID="lblCorrectAnswer" runat="server" Text=<%# writeCorrectAnswer(Eval("Quiz_QuestionId"))%>></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblDescription" runat="server" Text=<%#Eval("Quiz_QuestionAnswerDescription")%>></asp:Label>
            </td>
           
        </tr>
        </ItemTemplate>
        <FooterTemplate>
           <tr>
           <td>
            &nbsp;
           </td>
           </tr>
           <tr>
           <td>
           </td>
           <td>
             <asp:Label ID="lblTotalS" runat="server" Text="Total Score: "></asp:Label>
            
           </td>
             <td>
               <asp:Label ID="lblTotalScore" runat="server" Text=<%#getTotalScore()%>></asp:Label>
             </td>
           </tr>
        </FooterTemplate>
         </asp:Repeater>
    </table>
    </asp:Panel>

</asp:Content>
